package com.volunteer.controller;

import com.volunteer.service.PhotoDealService;
import com.volunteer.util.Result;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author willow
 * @version v.0.1
 * @date 2018年08月10日
 */
@RestController
@RequestMapping("/photos")  // 通过这里配置使下面的映射都在/photos下
public class PhotoDealController {
    @Autowired
    private PhotoDealService photoDealService;

    @ApiOperation(value = "获取图片中文字")
    @ApiImplicitParam(name = "photoAddress", value = "图片路径", required = true, dataType = "String")
    @GetMapping(value = "/identifyPhotoWords")
    public Result identifyPhotoWords(@RequestParam("photoAddress") String photoAddress) {
        return photoDealService.identifyPhotoWords(photoAddress);
    }
}
